import React, { use } from "react";
type propsTypes = {
  data?: {
    name?: string;
  };
};

// let api = getFeedList({
//     startNum: 0,
//     pageSize: 5,
//   });
let api = new Promise((resolve) => {
  setTimeout(() => {
    resolve({ name: "韩梅梅" });
  }, 100);
});

function ChildComponents({}: propsTypes) {

  const data: any = use(api);
  console.log(data);

  return <div dangerouslySetInnerHTML={{ __html: data.name }}></div>;
}

export default ChildComponents;
